custom_ore_generationfandomcom-20200215-history
Options
Options are variables used to control how a config file loads. They work like this: # An option is defined in the config file with a name and a set of possible values. # The value of the option is loaded from an option file. # The option value is used later in the config file to change what distributions are loaded or their settings. Options are useful because they allow a single config file to produce many different configurations. For example, the global config might contain both ore Veins and Clouds and use an option to decide which is generated. Each world can then have its own value for that option depending on whether the player wants veins or clouds in that world. This gives the player some freedom without having to set up separate configs for each world. With a few well-chosen options, the player might not have to open the config file at all. Options are defined using the and elements. See Option Types for details. Option values are available in expressions by using the option name like a variable. Choice options can be referenced directly by the Conditions#Value_of_a_Choice_Option conditional element. In debugging mode the /cogOption command can be used to temporarily change an option value. __TOC__ Option Files CustomOreGen Option files are named CustomOreGen_Options.txt. One will be created for each new world in the world save folder. This file is written in name=''value'' form and lines that begin with a '#' are comments. The file can be modified by the player if necessary (changes will take effect when the world is reloaded or the /cogLoadConfig command is used). A single dimension in a saved world can be given its own options file by placing the file in the dimension subfolder. This is done automatically for dimensions that have their own configs. A global options file can be created by placing the file in the /config folder. This will set the default option values for new worlds. For each dimension, COG loads any options files it finds in order from least-specific to most-specific starting at the level of the config file. Option files do not need to have a value for every option defined in the config. Any that are left out simply use the value from the previously loaded file, or from the default encoded into the option definition if they don't appear in any file at all. Example #Custom Ore Gen @VERSION@ Config Options #Tue Jan 30 08:29:37 CET 2018 deferredPopulationRange=32.0 debugMode=true In-Game Options Menu CustomOreGen provides an options menu during world creation. The options and values shown are from the Global config file. The player can adjust the values before creating the world, and the results will be used to create the world options file. If the world already has its own config file or options file (because the player created them manually before creating the world) then the options menu has no effect. The menu can be opened by clicking the Custom Ore Generation ... button in the world creation menu. Mousing over the option names or values will bring up a tooltip description. Display Groups Options can be organized into Display Groups, which appear as tabs at the top of the menu. The element defines a display group, and has the following attributes: Example: shown Options affecting all ore distributions. Option Types Choice Options A Choice option is a string chosen from a set of possible values. It is represented in the in-game Options menu as a button that cycles through the values. The element defines a choice option, and has the following attributes: elements must contain one or more elements, which list the possible values for the option. A Choice element has the following attributes: Example: shown_dynamic groupGeneral Debugging Mode Numeric Options A numeric option is a floating-point value between some minimum and maximum. It is represented in the in-game Options menu as a slider bar. The element defines a numeric option and has following attributes: Example: shown groupGeneral Deferred Chunk Gen. Range 0 128 16 Special Options Options generally have meaning only within the config file. There are three options, however, that get special treatment from CustomOreGen: Category:Browse